<?php
error_reporting(0);
$urls=require_once 'urllib.php';
$domain='www.cspudn.com';
foreach($urls as $url){
        $curl = str_replace('(*)', $domain, $url);
        $opts = array(
            'http' => array(
                'method' => "GET",
                'timeout' => 6,
            )
        );
        $context = stream_context_create($opts);
		$times=time();
        $s = file_get_contents($curl, false, $context);
		$h=$http_response_header;
        if (!$s) {
			
        }else{
			$f=false;
			foreach($h as $t){
				if(strpos($t,'200 OK')){
					$f=true;
				}
			}
			if($f){
				$timec=time()-$times;
				file_put_contents(dirname(__FILE__).'/costurl'.$timec.'.txt',$url.PHP_EOL,8);
			}
		}
}

?>